// 使用示例
loadScript('https://cgcres.chinagames.net/h5/js/sdk.js?v='+ ~(-new Date()/36e5), function(err) {
    if (err) {
        console.error('加载出错');
    } else {
        window.addEventListener("message", function(event) {
            switch (event.data.cmd) {
                case "qqsy_jssdk_finished":
                {
                    console.log("收到77sy_sdk加载完毕通知!!!!!");

                    //在此处执行游戏自身的业务逻辑JS
                    // 登录
                    qiqisy_login();
                    break
                }
            }
        }, false);

        console.log("是否打开游戏：",open_game);
        if(!open_game){
            open_game = 1;
        }
    }
});

function zhongyou_login(user_info){
    console.log("多游登录参数：",user_info);
    user_info.cid = cid;
    user_info.gid = gid;
    faXingLogin(user_info);
}

function getQueryParams() {
    var urlParams = new URLSearchParams(window.location.search);
    var params = {};
    for (var param of urlParams.entries()) {
        params[param[0]] = param[1];
    }
    return params;
}



function zhongyou_creterole(data){
    $.post(feihuo_creteroleUlr,data,function(info) {
        console.log("角色结果:",info);
    });
}



function zhongyou_pay(data){
    console.log("duoyou支付数据：",data);
    dy_jh_sdk.h5paySdk(data,function (result){
        console.log("duoyou发起支付");
    });
}
